// =====================================
// Pixel shader 
// Semi-transparent single color 
// =====================================

// The texture sampler 
sampler TextureSampler	: register(s0);

// The pixel shader input structure
struct PS_INPUT
{
	float4 TexCoord : TEXCOORD0;	// Texture coordinate
};

// The pixel shader output structure
struct PS_OUTPUT
{
	float4 Color	: COLOR0;		// Output color of the pixel
};

// Our pixel shader
PS_OUTPUT ThirdPixelShader(PS_INPUT In)
{
	PS_OUTPUT Result;
	

	
	//In.TexCoord.x = (int)(In.TexCoord.x /1.0f*77.0f)/77.0f;
	//In.TexCoord.y = (int)(In.TexCoord.y /1.0f*77.0f)/77.0f;
	
	//Result.Color = tex2D( TextureSampler, In.TexCoord.xy);
	//Result.Color -= tex2D( TextureSampler, In.TexCoord.xy+0.0001)*10.0f;
	//Result.Color += tex2D( TextureSampler, In.TexCoord.xy-0.0001)*10.0f;
	
	float4 TexColor = tex2D(TextureSampler, In.TexCoord) * float4(0.3f , 0.3f, 0.9f, 1.0f);
	
	Result.Color = TexColor; 
	
	
	return Result;
}